package cn.hqm.hqmtechnology.utils;

import java.lang.reflect.Field;

public class ObjectUtils {

    public static boolean allPropertiesEmpty(Object obj) {
        try {
            for (Field field : obj.getClass().getDeclaredFields()) {
                field.setAccessible(true);
                Object value = field.get(obj);
                if (value != null && !value.toString().trim().isEmpty()) {
                    return false;
                }
            }
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return true; // 如果发生异常，也将返回true
        }
    }
}
